package com.pattern.factory.factotyMethod;

import com.pattern.factory.House;

/**
 * Description
 *
 * @author hubiao
 * @since 2020-08-19 20:28
 */
public class factoryMethodTest {

    public static void main(String[] args) {
        /**
         *  根据父类引用指向子类来调用相对应子类的方法（多态的含义表现得淋漓尽致）
         */
        HouseFactory houseFactory = new HotelFactory();
        House house = houseFactory.create();
        house.describe();
    }
}
